<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>简易计算器</title>
    <link rel="shortcut icon" href="../img/logo.png" type="image/x-icon">
    <link rel="stylesheet" href="css/calculator.css">
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
</head>

<body>
    <div id="app" v-cloak>
        <table>
            <tr>
                <th colspan="4">{{result.value}}</th>
            </tr>
            <tr>
                <td v-on:click="inputValue('+')">+</td>
                <td v-on:click="inputValue('-')">-</td>
                <td v-on:click="inputValue('x')">x</td>
                <td v-on:click="inputValue('÷')">÷</td>
            </tr>
            <tr>
                <td v-on:click="inputValue('1')">1</td>
                <td v-on:click="inputValue('2')">2</td>
                <td v-on:click="inputValue('3')">3</td>
                <td v-on:click="clearValue()">C</td>
            </tr>
            <tr>
                <td v-on:click="inputValue('4')">4</td>
                <td v-on:click="inputValue('5')">5</td>
                <td v-on:click="inputValue('6')">6</td>
                <td v-on:click="squareValue()" >x²</td>
            </tr>
            <tr>
                <td v-on:click="inputValue('7')">7</td>
                <td v-on:click="inputValue('8')">8</td>
                <td v-on:click="inputValue('9')">9</td>
                <td v-on:click="radicalValue()">√</td>
            </tr>
            <tr>
                <td v-on:click="backValue()">←</td>
                <td v-on:click="inputValue('0')">0</td>
                <td v-on:click="inputValue('.')">.</td>
                <td v-on:click="calValue()">=</td>
            </tr>
        </table>
    </div>
    <script src="js/calculator.js"></script>
</body>

</html>